<script setup lang="ts">
// 可以在这里添加需要的逻辑
</script>

<template>
  <div class="start-container">
    <div class="background-overlay"></div>

    <div class="content-wrapper">
      <!-- 头部标题区域 - 与背景融合 -->
      <div class="header-section">
        <div class="house-icon">🏠</div>
        <h1 class="app-title">邻里社区</h1>
        <div class="title-divider"></div>
        <p class="app-subtitle">连接你我，共建美好家园</p>
      </div>

      <!-- 登录注册卡片 - 与背景分离但协调 -->
      <div class="auth-card">
        <nav class="auth-nav">
          <router-link to="/start/login" class="nav-link">
            <span>登录</span>
          </router-link>
          <router-link to="/start/register" class="nav-link">
            <span>注册</span>
          </router-link>
        </nav>
        <div class="router-view-container">
          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.start-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #1a2a6c 0%, #2a4b8c 50%, #3a6bc5 100%);
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  padding: 2rem;
}

/* 头部标题区域 - 与背景融合 */
.header-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.house-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.app-title {
  color: #fff;
  font-size: 2.8rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.title-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.7), transparent);
  margin: 1rem auto;
  border-radius: 3px;
}

.app-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 300;
}

/* 登录注册卡片 */
.auth-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.auth-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
  flex: 1;
  text-align: center;
  padding: 1.2rem 0;
  text-decoration: none;
  color: #555;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #2a4b8c;
}

.nav-link.router-link-exact-active {
  color: #2a4b8c;
  background: rgba(255, 255, 255, 0.95);
}

.nav-link.router-link-exact-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background: linear-gradient(to right, #2a4b8c, #3a6bc5);
  border-radius: 3px 3px 0 0;
}

.router-view-container {
  padding: 2rem;
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
    max-width: 90%;
  }

  .header-section {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }

  .house-icon {
    font-size: 3rem;
  }

  .app-title {
    font-size: 2.2rem;
  }

  .app-subtitle {
    font-size: 1rem;
  }

  .router-view-container {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .house-icon {
    font-size: 2.5rem;
  }

  .app-title {
    font-size: 1.8rem;
  }

  .app-subtitle {
    font-size: 0.9rem;
  }
}
</style>